<script type="text/javascript">
	function refresh() 
	{
		document.location = "/assessments/index;
	});
</script>

<select id="urlChange" label="Choose Assessment">
	<?php
		foreach ($assessments as $key => $value)
		{
			if($assessment['Assessment']['id'] == $key)
			{
				echo "<option value='" . $key. "' selected='selected'>" . $value . "</option>";
			}
			else
			{
				echo "<option value='" .$key. "'>" . $value . "</option>";
			}
		
		}
	?>
</select>

<div class="assessment">
	<div class="aTitle">
		<h2>Assessment One - Question Groups</h2>
		<span class="expander"><a href="#" class="contract">-</a></span>
	</div>
	<div class="aToolbar">
		<span class="aToolbarButton">
			<a href="#"><span class="iconNew"></span>
			<?php
				echo $ajax->link(
					'Add A Question Group',
					array( 'controller' => 'questiongroups', 'action' => 'ajax_add', $assessment['Assessment']['id'] ),
					array( 'update' => 'edit_div', 'indicator' => 'loading', 'title' => 'Add Question Group')
				);
			?></a>
		</span>
		<span class="aToolbarButton">
			<a href="#"><span class="iconEdit"></span>
			<?php 
				echo $ajax->link
				(
					'Edit Assessment',
					array( 'controller' => 'assessments', 'action' => 'edit', $assessment['Assessment']['id'] ),
					array( 'update' => 'edit_div', 'indicator' => 'loading')
				);
			?></a>
		</span>
		<span class="aToolbarButton">
			<a href="#"><span class="iconDelete"></span>
			<?php 
				echo $ajax->link
				(
					'Delete Assessment',
					array( 'controller' => 'assessments', 'action' => 'delete', $assessment['Assessment']['id'] ),
					array( 'update' => 'edit_div', 'confirm' => 'Are you sure?', 'indicator' => 'loading', 'onclick' => 'refresh();')
				);
			?></a>
		</span>
		<span class="aToolbarButton">
			<a href="#"><span class="iconDuplicate"></span>
			<?php 
					echo $ajax->link
					(
						'Duplicate Assessment',
						array( 'controller' => 'assessments', 'action' => 'duplicate', $assessment['Assessment']['id'] ),
						array( 'update' => 'edit_div', 'indicator' => 'loading')
					);
				?></a>
		</span>
	</div>
	<div class="aTable">
		<div class="aTableHeader">
			<span class="aTableDelete">Delete</span>
			<span class="aTableDuplicate">Duplicate</span>
			<span class="aTableEdit">Edit</span>
			<span class="aTableTitle">Question Group Title</span>
			<span class="aTableQuestion">Question</span>
		</div>
		<div class="aTableRowA">
			<span class="aTableDelete"><a href="#" class="iconDelete"></a></span>
			<span class="aTableDuplicate"><a href="#" class="iconDuplicate"></a></span>
			<span class="aTableEdit"><a href="#" class="iconEdit"></a></span>
			<span class="aTableTitle"><p class="titleText">Question Group One</p></span>
			<span class="aTableQuestion"><a href="#" class="iconQuestion"></a></span>
		</div>
		<div class="aTableRowB">
			<span class="aTableDelete"><a href="#" class="iconDelete"></a></span>
			<span class="aTableDuplicate"><a href="#" class="iconDuplicate"></a></span>
			<span class="aTableEdit"><a href="#" class="iconEdit"></a></span>
			<span class="aTableTitle"><p class="titleText">Question Group Two</p></span>
			<span class="aTableQuestion"><a href="#" class="iconQuestion"></a></span>
		</div>
	</div>
</div>